package org.osami.gateway.sensor;

import java.util.Collection;

/**
 * A SenseNode is a Service which represent a Sensor Node on the gateway.
 */
public interface SenseNode {
    
    String TOPIC_PREFIX = "osami/sensenode/";
    String DATA_RESSOURCE_NAME = "data";

    /**
     * @return The list of the Sense point available through this node
     */
    Collection<Sense> getSense();

    /**
     * @return The id of the sense node
     */
    String getId();

    /**
     * @return the uptime of the SenseNode proxy in Millisecond.
     */
    Long uptime();

    /**
     * @return The OSGi topic on which the data produced by this SenseNode are
     *         published.
     */
    String getTopic();
    
    /**
     * @return The Data Produce by this SenseNode
     */
    Collection<SenseData> getData();
    
    /**
     * @param senseName
     * @return The date produce by the Sense of given name available through this SenseNode
     * @throws IllegalArgumentException if the Sense of given name is not available through this SenseNode
     */
    SenseData getData(String senseName) throws IllegalArgumentException;
}
